package com.engine4cloud.tdf.education.controller.web;

import com.engine4cloud.tdf.common.core.constant.SecurityConstants;
import com.engine4cloud.tdf.common.core.util.R;
import com.engine4cloud.tdf.common.data.web.response.PageInfo;
import com.engine4cloud.tdf.supervision.dto.query.JzdxSimpleQueryDTO;
import com.engine4cloud.tdf.supervision.dto.result.JzdxSimpleResultDTO;
import com.engine4cloud.tdf.supervision.feign.RemoteJzdxService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.annotation.Resource;
import jakarta.validation.Valid;
import lombok.RequiredArgsConstructor;
import org.springdoc.core.annotations.ParameterObject;
import org.springframework.http.HttpHeaders;
import org.springframework.web.bind.annotation.*;


/**
 * 矫正对象
 *
 * @author wenjie
 * @date 2024-07-30 14:59:31
 */
@RestController
@RequiredArgsConstructor
@RequestMapping("/web/corrector")
@Tag(description = "corrector", name = "矫正对象列表-web")
@SecurityRequirement(name = HttpHeaders.AUTHORIZATION)
public class EduCorrectorWebController {

    @Resource
    private RemoteJzdxService remoteJzdxService;

    /**
     * 分页查询
     *
     * @param dto 学员
     * @return R<PageInfo < EduStudentResultDTO>>
     */
    @Operation(summary = "分页查询", description = "分页查询")
    @GetMapping("/page")
    public R<PageInfo<JzdxSimpleResultDTO>> pageList(@Valid @ParameterObject JzdxSimpleQueryDTO dto) {
        return remoteJzdxService.simplePageList(dto, SecurityConstants.FROM_IN);
    }

}